Apps:Using Qt with Standalone SDKs
This Quick Start shows how to set up a Qt for the Symbian platform development environment for application development using a standalone Symbian or Nokia S60 SDK, and how to build an existing example on the command line. To configure the environment for use with an IDE, developers should additionally follow the instructions in Apps:Qt Creator Quick Start (or the Apps:Qt Carbide.c++ IDE Quick Start). Process overview Setting up a Windows developer environment for Qt on the Symbian platform has five parts: # Set up Symbian C++ development environment # Update Symbian C++ Development Environment with Open C/C++ v1.6 and other patches required by Qt # Install Qt, layering over the top of selected SDKs # Configure the command line for Qt development # Deploy Qt binaries and Open C/Open C++ to the device. Symbian C++ development environment Assuming your computer meets the standard system requirements, setting up your Windows PC for Symbian platform C++ development is as simple as downloading and installing the following files (in order): # Perl. See the Kits Q&As for notes on the recommended version. # Application Developer Toolkit (ADT) (includes Carbide.c++ IDE) # Symbian Platform SDK or S60 Platform SDK (3rd Edition FP1 or higher) (all include GCCE compiler) ( is by default). There are instructions in the file in that directory. * The SDK will normally register itself in the file: , however on Vista it is forced to create the file in : ** Copy the file manually into the correct location. ** If you're installing a number of kits, it can be easier to manually add the kit using Carbide.c++ as described in the CarbideHelp}} Patch Symbian C++ development environment Open C and Open C++ Qt is dependent on the Open C and Open C++ compatibility layer, version 1.6.0 or higher. Symbian^3 Kits and devices have the correct version of the libraries and do not require patching. Symbian^1 and earlier SDKs should be patched: # Download the latest OpenC plugin SDK # Unzip the installation file and run the contained setup.exe # When prompted, select the target SDK over which you wish to install the plugin. Repeat steps 2 and 3 instructions for each SDK. library. This was installed by the OpenC plugin SDK to the S60_3rd_FP1_3 SDK root directory: : # Uncompress RPipe_3.1.zip over the SDK root tree (e.g. ). # Download and replace the file with getexports.exe }} Carbide Windows Compiler The Carbide Windows Compiler is used to compile binaries for the Windows-hosted Symbian Emulator. If you're using the version of Carbide.c++ in ADT 1.4 you will need to update to a newer version of Carbide.c++, or apply the following patch. Extract the file into the directory under your Carbide installation, e.g. * x86Tools_3.2.5_Symbian_b487.zip - windows compiler patch If you're using any other version of Carbide, you can check the compiler version by executing mwccsym2.exe from the command line as shown below. The Carbide compiler needs to be be at least version 3.2.5, build 487 to be able to build Qt properly. C:\Symbian\Tools\ADT_1.4\Carbide.c++\x86Build\Symbian_Tools\Command_Line_Tools\mwccsym2.exe The new version of the compiler is expected to be in ADT v1.5 (and later). Qt development environment Download and install the Qt for Open Source C++ development on Symbian installer file below. Qt must be installed on the same drive as your target SDK(s), and the install path must not contain any spaces. When prompted, specify the S60 5th Edition SDK (Symbian^1) and any other SDKs which you wish to use with Qt. * http://qt.nokia.com/downloads/symbian-cpp Nokia Smart Installer for Symbian The Nokia Smart Installer for Symbian is not present in standalone Qt SDKs: * Download the zip * Install to Qt Mobility APIs The Qt Mobility project delivers Qt APIs that address use cases that are of particular importance on mobile devices: e.g. access to device contacts, sensors, messaging etc (see Apps:Qt APIs for Mobile Use Cases for more information). These APIs are not present in the Qt SDK above, and must be applied as a patch: # Download and unzip the latest "Source and binary Symbian .zip" from the download page # Follow the instructions in the document INSTALL.symbian text file in the root of the zip file. The zip includes the qtmobility.sis file which must be deployed to the device. Configure command line The ADT environment must be configured to allow command line building for the Symbian platform emulator. Using the Windows start button: * All Programs | Symbian Foundation ADT v1.4 | Carbide.c++ | Configure environment for WINSCW command line You can alternatively set the following environment variable: SYMBIANBUILD_DEPENDENCYOFF=1 directory (by default this will be ). Note that on Windows Vista you will need to reboot your computer for the path changes to take effect.}} Deploy Qt to a device First install Ovi Suite or Nokia PC Suite and connect your device. You should then be able to install Qt SIS files by clicking on them. If the PC suite fails to install a SIS file for any reason you can manually copy them to the device using USB storage mode, and install them with the device file browser. During development, the easiest way to deploy Qt to your device is to install the qt_installer.sis or qt_demos.sis files that were copied with Qt onto your windows computer (into the Qt "root", by default at the location: ). These contain the Qt libraries and their dependencies (Open C and Open C++). The qt_demos.sis additionally contains the fluidlauncher demo applications. Note that you may need to first uninstall older versions of Open C and Open C++ and Qt. Samsung i8910/Omnia HD owners should instead install the Open C and Open C++ files below and qt_selfsigned.sis (at time of writing, none of the SIS files are signed with a certificate for Samsung phones). The Open C/C++ files are located in the Symbian SDK at the following path below the (the location where your SDK was installed): * * * Build an example application Open the command prompt provided in the Windows start button: All Programs | Qt for Symbian by Nokia v4.7.x | Qt for Symbian Command Prompt and navigate to your target project. For this example, we will build the animatedtiles example code that comes with the Qt installation: . Run qmake to generate the Symbian specific and files: qmake To build for the emulator, use make debug-winscw. Then use make run to launch the application in the emulator (or you can launch it in Windows Explorer by selecting SDK/epoc32/release/winscw/udbe/appname.exe): make debug-winscw make run To build for the device use make debug-gcce or make release-gcce to build debug/release binaries. After building the binaries you can call make sis to create an unsigned installation file that can be installed and run on devices where Qt has already been deployed. make debug-gcce make sis To create a self signed SIS file that will pre-install Qt you can then call make installer_sis to include the Smart Installe: make installer_sis There are a number of other make targets and command line options. These allow you, among other things, to build for the RVCT compiler, install the SIS file immediately after it is built, and specify certificates and keys used for signing the SIS files. These options are documented in The Symbian platform - Introduction to Qt. Note that this is the simplest possible installation process; it is suitable for development but you'll probably want to make changes for a real product - for example to Symbian sign the application and to provide instructions in multiple languages. Deployment is covered in more detail in the topic Apps:Deploying a Qt Application. Troubleshooting The vast majority of users will have followed the above instructions, and have now built an example on the command line without difficulty. If you do encounter development environment issues, then you should: * Test that your development environment is set up correctly * Follow the Development Environment Troubleshooting Guide * Review the Qt Known Issues (4.7.0) (on Gitorious). * Review the Qt FAQ on Gitorious Summary This tutorial showed how to set up a Qt development environment on a windows computer, build an example command line application, and deploy the Qt binaries and demos to your Symbian mobile device. Developers should next set up their IDE for Qt development, as discussed in Apps:Qt Creator Quick Start (or Apps:Qt Carbide.c++ IDE Quick Start). Related information * Qt on Samsung Symbian Part 1 and Part 2 * A Video Guide for Setting up Qt development environment for Symbian About the Kits: * What are the application developer kits? explains the ADT and SDK. * Kits Q&As * Debugging on the Device Quick Start Category:Qt Qt